<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>yLib: /home/sky/yLib/include/basic_algorithm/ylinear_list.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">yLib
   &#160;<span id="projectnumber">V0.0.9 beta</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('ylinear__list_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ylinear_list.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ylinear__list_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * @Author: Sky</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * @Date: 2020-05-22 09:54:19</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * @LastEditors: Sky</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * @LastEditTime: 2020-07-22 18:25:44</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * @Description: </span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef __BASIC_ALGORITHM_YSEQUENCE_LIST_HPP__</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define __BASIC_ALGORITHM_YSEQUENCE_LIST_HPP__</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="yobject_8hpp.html">core/yobject.hpp</a>&quot;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="yallocator_8hpp.html">core/yallocator.hpp</a>&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceyLib.html">yLib</a>{</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, <span class="keyword">class</span> Alloc=std::allocator&lt;T&gt;&gt;</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html">   26</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classyLib_1_1yLinearList.html">yLinearList</a> <a class="code" href="yobject_8hpp.html#a456ca9afeca82fe693720d57ef746192">MACRO_PUBLIC_INHERIT_YOBJECT</a></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <span class="comment">/* data */</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="comment">//unit is element_num.</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">   31</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> = 0;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="comment">//unit is byte.</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a9a2906c7289d2ff0d159a1ec47d72bef">   34</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classyLib_1_1yLinearList.html#a9a2906c7289d2ff0d159a1ec47d72bef">sq_capacity</a> = 0;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="comment">//unit is byte.</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a55ed3d89e1a7acc5b70ad8c08abb8f1c">   37</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classyLib_1_1yLinearList.html#a55ed3d89e1a7acc5b70ad8c08abb8f1c">sq_element_size</a> = 0;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">   39</a></span>&#160;        <span class="keywordtype">void</span> * <a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a> = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#ae4deeab60e1652f3af742211a824d19d">   47</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classyLib_1_1yLinearList.html#ae4deeab60e1652f3af742211a824d19d">sq_find_2index_greater_than_size</a>(<span class="keywordtype">size_t</span> size_){</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            <span class="keywordtype">size_t</span> _num_found = 1;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;            <span class="keywordflow">while</span> (_num_found &lt; size_)</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            {</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                _num_found = _num_found &lt;&lt; 1;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;            }</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;            <span class="keywordflow">return</span> _num_found;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        }</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a0b78644bb6caaa97769a0d0b1953f659">   64</a></span>&#160;        int8_t <a class="code" href="classyLib_1_1yLinearList.html#a0b78644bb6caaa97769a0d0b1953f659">check_capacity_and_alloc_mem_by_element_num</a>(<span class="keywordtype">size_t</span> element_num_){</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;            Alloc _alloc;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            <span class="keywordtype">size_t</span> _tmp_sq_capacity = 0;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;            <span class="keywordtype">void</span> * _tmp_sq_data_head = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            <span class="keywordflow">if</span> (element_num_ &gt; (<a class="code" href="classyLib_1_1yLinearList.html#a9a2906c7289d2ff0d159a1ec47d72bef">sq_capacity</a>/<span class="keyword">sizeof</span>(T))){<span class="comment">//mem that is not used is not enough</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                _tmp_sq_capacity = <a class="code" href="classyLib_1_1yLinearList.html#ae4deeab60e1652f3af742211a824d19d">sq_find_2index_greater_than_size</a>( element_num_ * <span class="keyword">sizeof</span>(T));</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                _tmp_sq_data_head = _alloc.allocate(std::ceil(_tmp_sq_capacity/<span class="keyword">sizeof</span>(T)));<span class="comment">//_tmp_sq_capacity/sizeof(T) + 1 </span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                <span class="comment">//call construct func</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i_ = 0; i_ &lt; <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a>; i_++ ){</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                    _alloc.construct( ((T *)_tmp_sq_data_head) + i_,  *(((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>) + i_));<span class="comment">//copy or move construct</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                <span class="comment">//call destory func</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i_ = 0; i_ &lt; <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a>; i_++ ){</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                    _alloc.destroy( ((T *)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>) + i_);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                <span class="comment">//free old mem-space</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                _alloc.deallocate((T *)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>, <a class="code" href="classyLib_1_1yLinearList.html#a9a2906c7289d2ff0d159a1ec47d72bef">sq_capacity</a>);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                <span class="comment">//new capacity , new head</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                <a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a> = _tmp_sq_data_head;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                <a class="code" href="classyLib_1_1yLinearList.html#a9a2906c7289d2ff0d159a1ec47d72bef">sq_capacity</a> = _tmp_sq_capacity;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a4c25c084820637bedfab57b4c344bfd3">   99</a></span>&#160;        <a class="code" href="classyLib_1_1yLinearList.html#a4c25c084820637bedfab57b4c344bfd3">yLinearList</a>() = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#ac2354cbdaca00f34d609e2aec4676fba">  100</a></span>&#160;        <span class="keyword">explicit</span> <a class="code" href="classyLib_1_1yLinearList.html#ac2354cbdaca00f34d609e2aec4676fba">yLinearList</a>(<span class="keywordtype">size_t</span> element_num_) <a class="code" href="yobject_8hpp.html#a7e8a05d3e4f465222c955b7381986927">MACRO_INIT_YOBJECT_PROPERTY</a>(<a class="code" href="classyLib_1_1yLinearList.html">yLinearList</a>) {</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            <a class="code" href="classyLib_1_1yLinearList.html#a55ed3d89e1a7acc5b70ad8c08abb8f1c">sq_element_size</a> = <span class="keyword">sizeof</span>(T);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;            <a class="code" href="classyLib_1_1yLinearList.html#a0b78644bb6caaa97769a0d0b1953f659">check_capacity_and_alloc_mem_by_element_num</a>(element_num_);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        }</div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#ac8ba6e32c7f443e43964509bfb653222">  105</a></span>&#160;        <a class="code" href="classyLib_1_1yLinearList.html#ac8ba6e32c7f443e43964509bfb653222">~yLinearList</a>(){</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;            Alloc _alloc;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            _alloc.deallocate((T *)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>, <a class="code" href="classyLib_1_1yLinearList.html#a9a2906c7289d2ff0d159a1ec47d72bef">sq_capacity</a>);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        </div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a18e301dc86db29dcd7035c5b7f1c9b7c">  122</a></span>&#160;        int8_t <a class="code" href="classyLib_1_1yLinearList.html#a18e301dc86db29dcd7035c5b7f1c9b7c">sq_insert</a>(<span class="keywordtype">size_t</span> pos_, T &amp; value_){</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            <span class="keywordflow">if</span> (pos_ &lt; 0 )</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                <span class="keywordflow">return</span> -1;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            <a class="code" href="classyLib_1_1yLinearList.html#a0b78644bb6caaa97769a0d0b1953f659">check_capacity_and_alloc_mem_by_element_num</a>(<a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> + 1);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            Alloc _alloc;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;            <span class="keywordflow">if</span> (pos_ &gt;= <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a>){<span class="comment">//at tail</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                <span class="comment">//((T*)sq_data_head)[sq_size] = value_;</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                _alloc.construct( ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>) + <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a>, value_);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> ++;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            }</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            _alloc.construct( ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>) + <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a>, value_);<span class="comment">//construct a obj at tail.</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;            <span class="keywordflow">for</span> (int64_t _i = <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> - 1; _i != -1; _i --){</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;                <span class="keywordflow">if</span> (pos_ != _i){</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;                </div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                    ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>)[_i + 1] = ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>)[_i ];</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                }</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                <span class="keywordflow">else</span>{</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;                </div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;                    ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>)[_i ] = value_;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;                    <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> ++;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;                    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;                }</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;            }</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160; </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        }</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#ae78f3768f44151f72e0cc1b6ef53ab81">  170</a></span>&#160;        int8_t <a class="code" href="classyLib_1_1yLinearList.html#ae78f3768f44151f72e0cc1b6ef53ab81">sq_delete</a>(T &amp; value_){</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;            Alloc _alloc;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;            </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            </div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            <span class="keywordtype">bool</span> _is_get_pos = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;            <span class="keywordflow">for</span> (uint32_t _i = 0; _i &lt;= <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> - 2; _i ++){</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                <span class="keywordflow">if</span> (value_ == ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>)[_i])</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                    _is_get_pos = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                <span class="keywordflow">if</span> (_is_get_pos)</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;                        ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>)[_i] = ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>)[_i + 1];</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                <span class="keywordflow">else</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                    <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                </div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;            <span class="keywordflow">if</span> (value_ == ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>)[<a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> - 1] || <span class="keyword">true</span> == _is_get_pos){</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            </div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;                _alloc.destroy(((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>) + <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> - 1);</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> --;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;                <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;            }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;                <span class="keywordflow">return</span> -1;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        }</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240">  199</a></span>&#160;        <span class="keyword">enum</span> <a class="code" href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240">yLinearListOrderType</a>:uint8_t{</div>
<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240a6d7038ad4f19edecbba24ae2d378c4cc">  200</a></span>&#160;            <a class="code" href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240a6d7038ad4f19edecbba24ae2d378c4cc">TYPE_DSC_ORDER</a> = 0,</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            <a class="code" href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240a27bf761c992e5c3a8cc248a886668b3e">TYPE_ASC_ORDER</a> = 1</div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240a27bf761c992e5c3a8cc248a886668b3e">  202</a></span>&#160;        };</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="comment">//fix a c++&#39;s error at line(178-184)</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a2e726f2c87a442a9ffbfb7a00b5cea34">  205</a></span>&#160;        <span class="keyword">const</span> <a class="code" href="classyLib_1_1yLinearList.html">yLinearList&lt;T, Alloc&gt;</a> &amp; <a class="code" href="classyLib_1_1yLinearList.html#a2e726f2c87a442a9ffbfb7a00b5cea34">operator=</a>(<span class="keyword">const</span> <a class="code" href="classyLib_1_1yLinearList.html">yLinearList&lt;T, Alloc&gt;</a> &amp; sq_)<span class="keyword"> const</span>{</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160; </div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            <span class="keywordflow">return</span> sq_;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        }</div>
<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#aa46154cb1d971b9e1384f692e1ea75f2">  223</a></span>&#160;        int8_t <a class="code" href="classyLib_1_1yLinearList.html#aa46154cb1d971b9e1384f692e1ea75f2">sq_merge</a>(<span class="keyword">const</span> <a class="code" href="classyLib_1_1yLinearList.html">yLinearList&lt;T, Alloc&gt;</a> &amp; sq0_, <span class="keyword">const</span> <a class="code" href="classyLib_1_1yLinearList.html">yLinearList&lt;T, Alloc&gt;</a> &amp; sq1_, <a class="code" href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240">yLinearListOrderType</a> order_type_){</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160; </div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            <a class="code" href="classyLib_1_1yLinearList.html#a0b78644bb6caaa97769a0d0b1953f659">check_capacity_and_alloc_mem_by_element_num</a>(sq0_.<a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> + sq1_.<a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a>);</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            uint64_t _cur_idx = 0;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            uint64_t _bak_sq_smaller_pos = 0;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;            <span class="keyword">const</span> <a class="code" href="classyLib_1_1yLinearList.html">yLinearList&lt;T, Alloc&gt;</a> &amp; sq_greater = sq0_;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            <span class="keyword">const</span> <a class="code" href="classyLib_1_1yLinearList.html">yLinearList&lt;T, Alloc&gt;</a> &amp; sq_smaller = sq1_;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            <span class="keywordflow">if</span> ( sq0_.<a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a> &lt; sq1_.<a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a>){</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                sq_greater = sq1_;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                sq_smaller = sq0_;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;            }</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160; </div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            <span class="keywordflow">for</span> (uint64_t i_ = 0, j_ = 0; i_ &lt; sq_greater.<a class="code" href="classyLib_1_1yLinearList.html#a6f16f109147bbea12465916d3cfd5d4d">sq_get_size</a>() ; ){</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240a6d7038ad4f19edecbba24ae2d378c4cc">TYPE_DSC_ORDER</a> == order_type_){<span class="comment">//dec</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                    <span class="keywordflow">if</span> (sq_greater.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(i_) &gt;= sq_smaller.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(j_)){</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                        <a class="code" href="classyLib_1_1yLinearList.html#a18e301dc86db29dcd7035c5b7f1c9b7c">sq_insert</a>(_cur_idx ,sq_greater.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(i_));</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                        i_++;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                        _cur_idx ++;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                        <span class="comment">//continue;</span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                    }</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;                    <span class="keywordflow">else</span>{</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                        <a class="code" href="classyLib_1_1yLinearList.html#a18e301dc86db29dcd7035c5b7f1c9b7c">sq_insert</a>(_cur_idx , sq_smaller.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(j_));</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                        j_++;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                        _cur_idx ++;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                        <span class="comment">//continue; </span></div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;                    }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;                }</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                <span class="keywordflow">else</span>{<span class="comment">//asc</span></div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160; </div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                    <span class="keywordflow">if</span> (sq_greater.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(i_) &lt;= sq_smaller.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(j_)){</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160; </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                        <a class="code" href="classyLib_1_1yLinearList.html#a18e301dc86db29dcd7035c5b7f1c9b7c">sq_insert</a>(_cur_idx ,sq_greater.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(i_));</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                        i_++;</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;                        _cur_idx ++;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;                        <span class="comment">//continue;</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                    }</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                    <span class="keywordflow">else</span>{</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160; </div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;                        <a class="code" href="classyLib_1_1yLinearList.html#a18e301dc86db29dcd7035c5b7f1c9b7c">sq_insert</a>(_cur_idx , sq_smaller.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(j_));</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;                        j_++;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                        _cur_idx ++;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                        <span class="comment">//continue; </span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                    }</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;                }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160; </div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                </div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;                _bak_sq_smaller_pos = j_;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;            }</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;            </div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;            <span class="keywordflow">if</span> (_bak_sq_smaller_pos &lt; sq_smaller.<a class="code" href="classyLib_1_1yLinearList.html#a6f16f109147bbea12465916d3cfd5d4d">sq_get_size</a>())</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j_ = _bak_sq_smaller_pos; j_ &lt; sq_smaller.<a class="code" href="classyLib_1_1yLinearList.html#a6f16f109147bbea12465916d3cfd5d4d">sq_get_size</a>(); j_ ++, _cur_idx++)</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                    <a class="code" href="classyLib_1_1yLinearList.html#a18e301dc86db29dcd7035c5b7f1c9b7c">sq_insert</a>(_cur_idx , sq_smaller.<a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(j_));</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160; </div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        }</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160; </div>
<div class="line"><a name="l00285"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">  285</a></span>&#160;        T &amp; <a class="code" href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">sq_get_value</a>(uint64_t val_pos_)<span class="keyword"> const</span>{</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;            <span class="keywordflow">return</span> ((T*)<a class="code" href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">sq_data_head</a>)[val_pos_];</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        }</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160; </div>
<div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#a6f16f109147bbea12465916d3cfd5d4d">  291</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classyLib_1_1yLinearList.html#a6f16f109147bbea12465916d3cfd5d4d">sq_get_size</a>(<span class="keywordtype">void</span>)<span class="keyword"> const</span>{</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160; </div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">sq_size</a>;</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        }</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160; </div>
<div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="classyLib_1_1yLinearList.html#afb23195dea33493df8949aa02efe5aa0">  296</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classyLib_1_1yLinearList.html#afb23195dea33493df8949aa02efe5aa0">sq_get_capacity</a>(<span class="keywordtype">void</span>)<span class="keyword"> const</span>{</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classyLib_1_1yLinearList.html#a9a2906c7289d2ff0d159a1ec47d72bef">sq_capacity</a>;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        }</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        </div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    };</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160; </div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;}</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160; </div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160; </div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160; </div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160; </div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160; </div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160; </div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;<span class="preprocessor">#endif //__BASIC_ALGORITHM_YSEQUENCE_LIST_HPP__</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a6f16f109147bbea12465916d3cfd5d4d"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a6f16f109147bbea12465916d3cfd5d4d">yLib::yLinearList::sq_get_size</a></div><div class="ttdeci">size_t sq_get_size(void) const</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:291</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a71b4481be545af98ff9d3fbbbd7dad2a"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a71b4481be545af98ff9d3fbbbd7dad2a">yLib::yLinearList::sq_data_head</a></div><div class="ttdeci">void * sq_data_head</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:39</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a4c25c084820637bedfab57b4c344bfd3"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a4c25c084820637bedfab57b4c344bfd3">yLib::yLinearList::yLinearList</a></div><div class="ttdeci">yLinearList()=delete</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a0cbeaf3a7ba4fce70c860b10dacef240"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240">yLib::yLinearList::yLinearListOrderType</a></div><div class="ttdeci">yLinearListOrderType</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:199</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_aa46154cb1d971b9e1384f692e1ea75f2"><div class="ttname"><a href="classyLib_1_1yLinearList.html#aa46154cb1d971b9e1384f692e1ea75f2">yLib::yLinearList::sq_merge</a></div><div class="ttdeci">int8_t sq_merge(const yLinearList&lt; T, Alloc &gt; &amp;sq0_, const yLinearList&lt; T, Alloc &gt; &amp;sq1_, yLinearListOrderType order_type_)</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:223</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_ae4deeab60e1652f3af742211a824d19d"><div class="ttname"><a href="classyLib_1_1yLinearList.html#ae4deeab60e1652f3af742211a824d19d">yLib::yLinearList::sq_find_2index_greater_than_size</a></div><div class="ttdeci">size_t sq_find_2index_greater_than_size(size_t size_)</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:47</div></div>
<div class="ttc" id="ayobject_8hpp_html_a456ca9afeca82fe693720d57ef746192"><div class="ttname"><a href="yobject_8hpp.html#a456ca9afeca82fe693720d57ef746192">MACRO_PUBLIC_INHERIT_YOBJECT</a></div><div class="ttdeci">#define MACRO_PUBLIC_INHERIT_YOBJECT</div><div class="ttdoc">The public inherit from yObject.</div><div class="ttdef"><b>Definition:</b> yobject.hpp:101</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_ac2354cbdaca00f34d609e2aec4676fba"><div class="ttname"><a href="classyLib_1_1yLinearList.html#ac2354cbdaca00f34d609e2aec4676fba">yLib::yLinearList::yLinearList</a></div><div class="ttdeci">yLinearList(size_t element_num_) \</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:100</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a0b78644bb6caaa97769a0d0b1953f659"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a0b78644bb6caaa97769a0d0b1953f659">yLib::yLinearList::check_capacity_and_alloc_mem_by_element_num</a></div><div class="ttdeci">int8_t check_capacity_and_alloc_mem_by_element_num(size_t element_num_)</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:64</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a0cbeaf3a7ba4fce70c860b10dacef240a27bf761c992e5c3a8cc248a886668b3e"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240a27bf761c992e5c3a8cc248a886668b3e">yLib::yLinearList::TYPE_ASC_ORDER</a></div><div class="ttdeci">@ TYPE_ASC_ORDER</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:201</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a2da8013972026720036b479b468d6093"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a2da8013972026720036b479b468d6093">yLib::yLinearList::sq_get_value</a></div><div class="ttdeci">T &amp; sq_get_value(uint64_t val_pos_) const</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:285</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_ac8ba6e32c7f443e43964509bfb653222"><div class="ttname"><a href="classyLib_1_1yLinearList.html#ac8ba6e32c7f443e43964509bfb653222">yLib::yLinearList::~yLinearList</a></div><div class="ttdeci">~yLinearList()</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:105</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html"><div class="ttname"><a href="classyLib_1_1yLinearList.html">yLib::yLinearList</a></div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:27</div></div>
<div class="ttc" id="ayobject_8hpp_html_a7e8a05d3e4f465222c955b7381986927"><div class="ttname"><a href="yobject_8hpp.html#a7e8a05d3e4f465222c955b7381986927">MACRO_INIT_YOBJECT_PROPERTY</a></div><div class="ttdeci">#define MACRO_INIT_YOBJECT_PROPERTY(object_name)</div><div class="ttdoc">Set the object-name.</div><div class="ttdef"><b>Definition:</b> yobject.hpp:107</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a2e726f2c87a442a9ffbfb7a00b5cea34"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a2e726f2c87a442a9ffbfb7a00b5cea34">yLib::yLinearList::operator=</a></div><div class="ttdeci">const yLinearList&lt; T, Alloc &gt; &amp; operator=(const yLinearList&lt; T, Alloc &gt; &amp;sq_) const</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:205</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a9809aea29244a14b4e9b6d7f3703adcd"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a9809aea29244a14b4e9b6d7f3703adcd">yLib::yLinearList::sq_size</a></div><div class="ttdeci">size_t sq_size</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:31</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_afb23195dea33493df8949aa02efe5aa0"><div class="ttname"><a href="classyLib_1_1yLinearList.html#afb23195dea33493df8949aa02efe5aa0">yLib::yLinearList::sq_get_capacity</a></div><div class="ttdeci">size_t sq_get_capacity(void) const</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:296</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a55ed3d89e1a7acc5b70ad8c08abb8f1c"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a55ed3d89e1a7acc5b70ad8c08abb8f1c">yLib::yLinearList::sq_element_size</a></div><div class="ttdeci">size_t sq_element_size</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:37</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a18e301dc86db29dcd7035c5b7f1c9b7c"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a18e301dc86db29dcd7035c5b7f1c9b7c">yLib::yLinearList::sq_insert</a></div><div class="ttdeci">int8_t sq_insert(size_t pos_, T &amp;value_)</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:122</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_ae78f3768f44151f72e0cc1b6ef53ab81"><div class="ttname"><a href="classyLib_1_1yLinearList.html#ae78f3768f44151f72e0cc1b6ef53ab81">yLib::yLinearList::sq_delete</a></div><div class="ttdeci">int8_t sq_delete(T &amp;value_)</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:170</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a0cbeaf3a7ba4fce70c860b10dacef240a6d7038ad4f19edecbba24ae2d378c4cc"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a0cbeaf3a7ba4fce70c860b10dacef240a6d7038ad4f19edecbba24ae2d378c4cc">yLib::yLinearList::TYPE_DSC_ORDER</a></div><div class="ttdeci">@ TYPE_DSC_ORDER</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:200</div></div>
<div class="ttc" id="aclassyLib_1_1yLinearList_html_a9a2906c7289d2ff0d159a1ec47d72bef"><div class="ttname"><a href="classyLib_1_1yLinearList.html#a9a2906c7289d2ff0d159a1ec47d72bef">yLib::yLinearList::sq_capacity</a></div><div class="ttdeci">size_t sq_capacity</div><div class="ttdef"><b>Definition:</b> ylinear_list.hpp:34</div></div>
<div class="ttc" id="ayobject_8hpp_html"><div class="ttname"><a href="yobject_8hpp.html">yobject.hpp</a></div></div>
<div class="ttc" id="ayallocator_8hpp_html"><div class="ttname"><a href="yallocator_8hpp.html">yallocator.hpp</a></div></div>
<div class="ttc" id="anamespaceyLib_html"><div class="ttname"><a href="namespaceyLib.html">yLib</a></div><div class="ttdoc">This is a top namespace in yLib.</div><div class="ttdef"><b>Definition:</b> ylinuxerrnohelper.cpp:28</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_f92f6ddbc0b7c5c5e865ef4f8db95fd5.html">basic_algorithm</a></li><li class="navelem"><a class="el" href="ylinear__list_8hpp.html">ylinear_list.hpp</a></li>
    <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  </ul>
</div>
</body>
</html>
